package ch6;

import java.util.Scanner;

public class Array2 {

	public static void main(String[] args) {
		// 声明的同时赋值
		int[] a = { 1, 2, 3, 4 };
		int[] b = new int[] { 1, 2, 4, 5, 6, 9 };
		// int c[] = new int[30] { 1, 2 };
		int c[] = new int[10];
		// c={1,2,3,4};
		Scanner in = new Scanner(System.in);
		System.out.println(b.length);
		System.out.println("输入10个数：");
		for (int i = 0; i < c.length; i++) {
			c[i] = in.nextInt();
		}
		for (int i = 0; i < c.length; i++) {
			System.out.print(c[i] + "\n");
		}
	}

}
